package com.AnnotationBasedConfig;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.apache.log4j.Logger;

public class MainApp {

	static Logger log = Logger.getLogger(MainApp.class.getName());

	public static void main(String[] args) {

		log.info("Going to create HelloWord Obj");

		ApplicationContext context = new ClassPathXmlApplicationContext(
				"AnnotationBasedBeans.xml");

		Profile profile = (Profile) context.getBean("profile");

		profile.printName();
		profile.printAge();

		log.info("Exiting the program");

	}
}